'use strict';

/**
 * @param {Egg.Application} app - egg application
 */

module.exports = app => {
    const { router, controller } = app;

    // 单位管理
    router.post("/unit/add", controller.organization.unit.add);
    router.get("/unit/list", controller.organization.unit.list);
    router.post("/unit/update", controller.organization.unit.update);
    router.delete("/unit/delete", controller.organization.unit.delete);

    // 部门管理
    router.post("/department/add", controller.organization.department.add);
    router.get("/department/list", controller.organization.department.list);
    router.post("/department/update", controller.organization.department.update);
    router.delete("/department/delete", controller.organization.department.delete);

    // 员工管理
    router.post("/staff/add", controller.organization.staff.add);
    router.get("/staff/list", controller.organization.staff.list);
    router.delete("/staff/delete", controller.organization.staff.delete);
    router.post("/staff/update", controller.organization.staff.update);
    router.post("/staff/updateStaffAuthority", controller.organization.staff.updateStaffAuthority);

    // 角色管理
    router.post("/staffRole/add", controller.organization.role.add);
    router.get("/staffRole/list", controller.organization.role.list);
    router.put("/staffRole/update", controller.organization.role.update);
    router.delete("/staffRole/delete", controller.organization.role.delete);



};




